<template>
  count:{{ count }}
  <br />
  <input type="text" v-model="count" />
  <hr />
  countDelay:{{ countDelay }}
  <br />
  <input type="text" v-model="countDelay" />
</template>

<script>
import { useDebounceRefs, useDebounceRefsDelay } from './hook/1.useDebounceRefs.js'
export default {
  setup() {
    // useDebounceRefs相当于vue的ref
    const count = useDebounceRefs(0)
    // useDebounceRefsDelay会进行延迟后更新操作
    const countDelay = useDebounceRefsDelay(100)

    return {
      count,
      countDelay,
    }
  },
}
</script>
<style scoped></style>
